package com.xbongbong.paas.pojo.dto;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.constant.PaasConstant;
import com.xbongbong.paas.domain.entity.PaasFormExplainEntity;
import com.xbongbong.paas.field.FieldAttrEntity;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.sys.domain.entity.DepartmentEntity;
import com.xbongbong.sys.domain.entity.UserEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.util.HashMap;
import java.util.Map;

/**
 * @author: wufeng
 * @date: 2018/12/17 22:43
 * @desrcption:
 */
@Getter
@Setter
@ToString
public class LinkSearchGetDTO extends BaseDTO {
    private static final long serialVersionUID = 527326793277667205L;

    /**
     * 应用id
     */
    @NotNull(message = "{dto.msg.linkSearchGet.appId.NotNull}")
    private Long appId;

    @NotNull(message = "{dto.msg.linkSearchGet.menuId.NotNull}")
    private Long menuId;

    /**
     * 字段
     */
    private String attr;

    /**
     * 子表单字段
     */
    private String subAttr;

    /**
     * 数据容器
     */
    private JSONObject jsonObject;

    /**
     * 字段容器
     */
    private Map<String, FieldAttrEntity> explainMap;

    /**
     * 用户容器
     */
    private Map<String, UserEntity> userMap;

    /**
     * 部门容器
     */
    private Map<String, DepartmentEntity> departmentMap;

    /**
     * 当前应用所有表单字段表数据
     */
    private Map<String, PaasFormExplainEntity> formExplainMap;

    public LinkSearchGetDTO(){
        formExplainMap = new HashMap<>(PaasConstant.DEFAULT_INITIAL_CAPACITY);
    }
}
